package com.gitee.ricesugar.mapper;

import com.gitee.ricesugar.controller.request.BaseRequest;
import com.gitee.ricesugar.entity.Book;
import com.gitee.ricesugar.entity.BookRecord;
import org.apache.ibatis.annotations.Mapper;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface BookMapper {

    List<Book> listByCondition(BaseRequest baseRequest);

    List<BookRecord> listRecordByCondition(BaseRequest baseRequest);

    void add(Book obj);

    Book getByISBN(String isbn);

    void updateByISBN(Book obj);

    void deleteByISBN(String isbn);

    void deleteRecordById(Integer id);

    void borrow(HashMap<Object, Object> obj);

    void returnBook(Integer id);
}